package com.sdjenkins.lab;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;

import static org.mockito.Mockito.*;
public class Main1 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

	//	init();

	int i = 13/3;
	
	int j = 13/3 * 3;
	
	int k = 1;
		
		

	}

	private static void closeWindow(Window w) {
		
		System.out.println("Closing Window");
		w.dispose();
		System.out.println("Closed Window");
		System.exit(0);
	}
	
	
	private static void init() {
		
		JFrame frame = new JFrame();
		
		frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		Container c = frame.getContentPane();
		BorderLayout bl = new BorderLayout();
		JPanel pan = new JPanel();
		pan.setBackground(Color.LIGHT_GRAY);
		pan.setPreferredSize(new Dimension(200, 40));
		frame.setLayout(bl);
		frame.setBounds(50, 100, 600, 300);
		frame.add(getW1(),BorderLayout.CENTER);
		frame.add(pan, BorderLayout.SOUTH);
		frame.setVisible(true);

		
		
		
		
		
		
		
		
	}
	
	private static Component getW1() {
		
	
		
		DefaultTableModel mod = new DefaultTableModel();
		
		mod.setColumnIdentifiers(new Object[] { "Date", "Agent", "Agency", "Job Ref", "Company"});
		mod.addRow(new Object[] {"2010.08.10", "Fred Bloggs", "Jobs R Us", "J001", "Shell"});
		mod.addRow(new Object[] {"2010.08.11", "Mary Lamb", "Jobs R Us", "J002", "Shell"});		
		mod.addRow(new Object[] {"2010.08.12", "Eric Cire", "Java Jobs", "J003", "Shell"});		
		
		JTable tab = new JTable(mod);
		JScrollPane sp = new JScrollPane();
		sp.setViewportView(tab);
		tab.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
		tab.setCellSelectionEnabled(true);
		tab.setShowGrid(true);
		return sp;
		
	}
	
}
